package com.tsd.base.dao;

import com.tsd.base.entity.BasePrinter;
import com.tsd.base.entity.BasePrinterExt;
import com.tsd.core.vo.PageBean;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 描述：BasePrinterMapper
 *
 * @author david
 * @date 2022/05/12 09:38:04
 */
public interface BasePrinterMapper {

    BasePrinter selectByPrimaryKey(Long id);

    BasePrinterExt selectBySid(String sid);

    int deleteByPrimaryKey(Long id);

    int insert(BasePrinter record);

    int insertSelective(BasePrinter record);

    int insertList(List<BasePrinter> list);

    int updateByPrimaryKey(BasePrinter record);

    int updateByPrimaryKeySelective(BasePrinter record);

    List<BasePrinterExt> selectByEntity(BasePrinter record);

    List<BasePrinterExt> selectByPage(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    List<BasePrinterExt> selectCount1Page(@Param("params") Map<String, Object> params, @Param("page") PageBean page);

    List<BasePrinterExt> selectByParams(@Param("params") Map<String, Object> params);

    int countValid();
    //批量插入，mysql默认接受sql的大小是1048576(1M)，此方式若数据量超过1M会报如下异常：（可通过调整MySQL安装目录下的my.ini文件中[mysqld]段的＂max_allowed_packet = 1M＂）
    //void insertList(List<BasePrinter> list);
}